import java.io.UnsupportedEncodingException;

import com.bankcomm.netpay.Config;
import com.bankcomm.netpay.Post;

public class TestBcm {

	public static void main(String[] args) throws Exception {
		String configPath = "E:\\bcmbank\\bcmbank_config.xml";
		Config.loadConfig(configPath);
		
		String CONFIGID = "wntest";
		String reqSign= Config.attachedSign(CONFIGID,"adf");
		String httpsType = Config.getHttpsType(CONFIGID);
		String apiUrl = Config.getApiURL(CONFIGID);
		String resSign= Post.post(httpsType,apiUrl,"reqData="+java.net.URLEncoder.encode(reqSign, "GBK"));
		System.out.println(resSign);
		String resSrc = Config.attachedVerify(CONFIGID,resSign );
		System.out.println("resSrc=" + resSrc);
		
		String srcMsg = "123";
		String signMsg = "123";
		if(Config.detachedVerify(CONFIGID,srcMsg, signMsg).equals("")) {
			
		}
	}

}
